package com.lhq.message.rabbitmq.listener;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = "myDirectQueue")
public class DirectReceiver {
    @RabbitHandler
    public void process(String msg) {
        System.out.println("消费者收到消息：" + msg);
    }
}
